<?php

use yii\helpers\Url;

/* @var $this \yii\web\View */
/* @var $content string */
/* @var \common\models\User $info */
/* @var \common\models\Order[] $list */

$this->title = '订单列表'
?>
<section class="app-container app-order">
    
    <?php
    foreach( $list as $k => $model ){
        ?>
        <div class="app-order-item" href="<?= Url::toRoute(['member/order-info', 'id' => $model->id]) ?>" >
            <div class="app-order-item-photos">
                <img src="<?= $model->goods->file->file_path ?>" alt="<?= $model->goods->goods_name ?>">
            </div>
            <div class="app-order-item-infos">
                <h3><?= $model->goods->goods_name ?></h3>
                <p>
                    <?= $model->price .'元' ?>
                </p>
                <div class="clearfix">
                    <small class="pull-left"><?= date('Y-m-d H:i:s',$model->created_time) ?></small>
                    <?php
                    if($model->stauts == 0){
                        ?>
                        <span class="pull-right app-status-error">未付款</span>
                        <?php
                    }elseif( $model->stauts == 1 ){
                        ?>
                        <span class="pull-right app-status-error">未付款</span>
                        <?php
                    }elseif( $model->stauts == 2 ){
                        ?>
                        <span class="pull-right app-status-success">已付款</span>
                        <?php
                    }
                    ?>
                </div>
            </div>
        </div>
        <?php
    }
    ?>


</section>
